/* 
  Copyright (c) SilverLining 2015
  Date:    2016-1-7
  File:    shim_data.h  
  Description: 

*/

#pragma once

namespace SL
{
	namespace M
	{
		/// <summary>
		/// Represent a native shim for managed game data.
		/// </summary>
		/// <remarks>This class is meant for internal use.</remarks>
		class shim_data : public m::object
		{
		public:
			shim_data();

			/// <summary>
			/// Initialize the object.
			/// </summary>
			/// <param name="obj">The managed object to be used for initialization.</param>
			void init(Object^ obj);

			static void * operator new(size_t sz);
			static void operator delete(void * ptr);

			virtual std::wstring to_string() const;

			/// <summary>
			/// A handle to the object being shimmed.
			/// </summary>
			gcroot<Object^> Obj;
		};
	}
}